package method;

public class GMethodTest {

    public static void main(String[] args) {

        String[] names = { "Andy", "Tom", "Lucy", "James" };
        System.out.println(ArrayAlg.<String>getMiddle(names));
    }
}


class ArrayAlg {

    public static <T> T getMiddle(T... array) {
        return array[array.length / 2];
    }
}
